

<ion-view class="client" title="{{client.name}}" >
  <ion-header-bar class="bar-subheader" align-title="center" >
    <div class="row">
      <div class="col col-20"></div>
      <div class="col col-60">
        <div class="button-bar">
          <a ng-class="btn.defaultbtnleft" ng-click="changeActive(0)">客户状况</a>
          <a ng-class="btn.defaultbtnright" ng-click="changeActive(1)">动态信息</a>
        </div>
      </div>
      <div class="col col-20"></div>
    </div>

    <div  class="search-width">
      <label class="item item-input" >
        <i class="icon ion-search placeholder-icon"></i>

        <input type="text" placeholder="信息类型、单号、日期" ng-model="msgSearch">
      </label>
    </div>

  </ion-header-bar>
  <ion-content class="has-subheader" >

    <ion-refresher on-refresh="doRefresh()" pulling-text="下拉刷新..." refreshing-text="刷新中!" refreshing-icon="ion-loading-c">
    </ion-refresher>
    <!-- 客户状况 -->
    <div class="list container content-color" ng-if="btn.checked">

      <ion-list>
        <div>
          <ion-item class="item-stable" style="padding:12px" on-tap="toggleGroup(1)"
                    ng-class="{active: isGroupShown(1)}"><i class="icon"
                                                            ng-class="isGroupShown(1) ? 'ion-chevron-down' : 'ion-chevron-up'"></i>
            &nbsp; 财务信息
          </ion-item>
          <ion-item class="content-color"  ng-show="!isGroupShown(1)">
            <div class="bill-detail">
              <div class="row" ng-repeat="z in financelist">
                <div class="col col-50 fix-br" style="text-align: right">{{z.name}}:</div>
                <div class="col col-50 fix-br">￥{{z.value}}</div>
              </div>
            </div>

          </ion-item>
        </div>
        <div>
          <ion-item class="item-stable" style="padding:12px" on-tap="toggleGroup2(2)"
                    ng-class="{active: isGroupShown2(2)}"><i class="icon"
                                                            ng-class="isGroupShown2(2) ? 'ion-chevron-down' : 'ion-chevron-up'"></i>
            &nbsp; 业务信息
          </ion-item>
          <ion-item class="content-color"  ng-show="!isGroupShown2(2)">
            <div class="bill-detail">
              <div class="row" ng-repeat="z in businesslist">
                <div class="col col-50 fix-br" style="text-align: right">{{z.name}}:</div>
                <div class="col col-50 fix-br">{{z.value}}</div>
              </div>
            </div>

          </ion-item>
        </div>
        <div>
          <ion-item class="item-stable" style="padding:12px" on-tap="toggleGroup3(3)"
                    ng-class="{active: isGroupShown3(3)}"><i class="icon"
                                                             ng-class="!isGroupShown3(3) ? 'ion-chevron-down' : 'ion-chevron-up'"></i>
            &nbsp; 客户报表
          </ion-item>
          <ion-item  class="content-color"  ng-show="isGroupShown3(3)">
            <div class="bill-detail2">
              <img src="img/share.png" ng-click="shareChartImage()" style="position: absolute;top: 45px;right: 40px;
  width: 20px;height: 20px;z-index: 3;">
              <div id="lineDom" style="padding:10px;background-color: #FFFFFF">
              </div>
            </div>
            <canvas id="myCanvas" style="display: none;">
            </canvas>
          </ion-item>
        </div>


      </ion-list>
    </div>
    <!-- 动态信息 -->
    <div class="list container content-color" ng-if="!btn.checked">

      <div class="list-li" ng-repeat="x in msgList|filter:msgSearch">
        <div class="li-left">
          <div class="line"></div>
          <div ng-class="x.read?'circle':'circle0'"></div>
        </div>
        <div class="li-right">
          <div class="li-triangle"></div>
          <div class="item item-icon-right" on-tap="toMessageDetail(x.id)">
            <i ng-class="x.read?'text-msg-black':'text-msg-red'">{{x.name}}</i></br>
                        <span class="sign-time">
                          {{x.detail}}<br>
                          {{x.time | date:"yyyy-MM-dd HH:mm:ss"}}</span>

          </div>
        </div>
        <i class="icon ion-ios7-arrow-right"></i>
      </div>
      <ion-infinite-scroll on-infinite="loadMore()" icon="ion-loading-c" distance="5%">
      </ion-infinite-scroll>
    </div>


    <!--<div class="nomoremsg" ng-hide="canbeLoad()">亲，没有更多数据了O(∩_∩)O</div>-->

  </ion-content>
</ion-view>
